<span id="Field">
    <php>
        $field = isset($post['post_id']) ? $post['post_id'] : 0;
    </php>
</span>

<script type="text/javascript">
    function get_field(cid) {
        layui.use(['form','layer'], function () {
            var form = layui.form;
            var article_id = {$field};
            layer_loading('正在加载');
            $.ajax({
                url: "{:url('AdminArticle/ajax_get_field')}",
                data: {cid:cid,_ajax:1,article_id:article_id},
                type:'get',
                success:function(res) {
                    layer.closeAll();
                    if (res.code == 400) {
                        layer.alert(res.msg, {icon: 2, title:false});
                    } else {
                        // var field = eval('(' + res + ')');
                        $('#Field').empty().html(res.data);
                    }
                },
                error: function(e){
                    layer.closeAll();
                    layer.alert(ey_unknown_error, {icon: 2, title:false});
                }
            });
        })
    }
</script>